Various nations have safety standards for vehicle headlamps, for example, which require that headlamps are on, even during a daytime drive, with an intensity of a predetermined ratio (e.g., 25%) to that during a night drive. In view of this, there has been proposed a daylight system for lighting headlamps during daytime by PWM control with an intensity of a predetermined ratio to that during nighttime. A construction for the PWM control is disclosed in Japanese Patent Laid-Open No. 2003-188693, for example. In the construction, based on the interterminal voltage of a capacitor that repeats charge and discharge, a triangular wave signal is provided for a hysteresis comparator. The hysteresis comparator compares in magnitude the level of the triangular wave signal with two threshold voltages provided therein, and outputs an output signal as a PWM signal according to level inversion of the magnitude relation. Thus the hysteresis comparator is used, and thereby chattering due to a vehicle power-supply noise or the like can be prevented when level-inversion occurs between the triangular wave signal and each of the threshold voltages.
However, in the above construction using a hysteresis comparator, the circuit constant of the hysteresis comparator may have a variation due to manufacturing reasons or the like. FIG. 3 shows a typical circuit construction that uses a hysteresis comparator. As shown in the figure, the output terminal of the comparator 1 is fed back to the positive input terminal via a feedback resistor 2, and also connected to a power-supply line 4 (+B) via a resistor 3. A triangular wave signal is applied to the negative input terminal of the comparator 1, while a divided voltage obtained by dividing a power supply voltage using resistors 5, 6 is applied as a threshold voltage to the positive input terminal. According to the construction, an output from the hysteresis comparator is directly used as a PWM signal. However, the resistance values of the resistive elements (resistors 2, 3) included in the hysteresis comparator may have a variation due to manufacturing reasons. Even if external resistors are used as the resistors 5, 6 for mitigating variation of the resistors 5, 6, the threshold voltages may vary due to variation of the resistors 2, 3 in the hysteresis comparator. Thereby times when level-inversion occurs between the triangular wave signal and each of the threshold voltages may vary, and consequently a duty ratio of the output signal (PWM signal) from the hysteresis comparator may vary from one product to another. Then a problem arises that headlamps cannot be lighted stably with a predetermined intensity during daytime.
Thus, there is a need in the art to provide a PWM signal generator capable of generating a PWM signal of a stable duty ratio with immunity from a vehicle power-supply noise, manufacturing variation of circuit constants or the like.